const express = require("express");
const UserController = require("../../controller/UserController");
const multer = require("../../utils/multer");

// 创建路由对象
const user = express.Router();

user.get("/user", UserController.getUser);
user.post("/user", multer.single("avatar"), UserController.addUser);
user.put("/user/:id", UserController.updateUser);
user.delete("/user/:id", UserController.delUser);

module.exports = user;
